package com.lfz.demo.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lfz.demo.dao.MenuMapper;
import com.lfz.demo.entity.Menu;
import com.lfz.demo.repository.MenuRepository;
import com.lfz.demo.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;

/**
 * @author lfz
 * @date 2025/3/3 16:03
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements MenuService {

    @Autowired
    private MenuRepository menuRepository;

    @Override
    public Page<Menu> findByPage(Specification<Menu> spec, Pageable pageable) {
        return menuRepository.findAll(spec, pageable);
    }
}
